package com.itheima.domain;
import java.util.List;

public class PageResult<T> {

    private Long total;//总记录数
    private List<T> records;//记录
    private int size;//每页个数
    private int current;//当前页
    private List orders;
    private Boolean optimizeCountSql = true;
    private Boolean isSearchCount = true;

    public PageResult() {
    }

    public PageResult(Long total, List<T> records, int size) {
        this.total = total;
        this.records = records;
        this.size = size;
    }

    public PageResult(Long total, List<T> records, int size, int current) {
        this.total = total;
        this.records = records;
        this.size = size;
        this.current = current;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public List getOrders() {
        return orders;
    }

    public void setOrders(List orders) {
        this.orders = orders;
    }

    public Boolean getOptimizeCountSql() {
        return optimizeCountSql;
    }

    public void setOptimizeCountSql(Boolean optimizeCountSql) {
        this.optimizeCountSql = optimizeCountSql;
    }

    public Boolean getSearchCount() {
        return isSearchCount;
    }

    public void setSearchCount(Boolean searchCount) {
        isSearchCount = searchCount;
    }
}
